//  https://iai.sh.cn/problem/602 
//未完成
#include <bits/stdc++.h>
using namespace std;
int tou[1000001][2];
const int M = 1'000'000'007;
int main() {
  int n;
  cin >> n;
  tou[1][0] = 1;
  tou[1][1] = 1;
  for (int i = 2; i <= n; i++) {
    tou[i][0] = 
    ( 2 * (tou[i - 1][0]+tou[i - 1][1]) - tou[i - 2][0]) % M;
  }
  cout << tou[n];
  return 0;
}